<template>
  <div class="basic-settings">
    <h3>基础设置</h3>
    <el-form :model="form" label-width="120px">
      <el-form-item label="系统名称">
        <el-input v-model="form.systemName" placeholder="请输入系统名称" />
      </el-form-item>
      <el-form-item label="系统语言">
        <el-select v-model="form.language" placeholder="请选择系统语言">
          <el-option label="中文" value="zh" />
          <el-option label="英文" value="en" />
        </el-select>
      </el-form-item>
      <el-form-item label="时区设置">
        <el-select v-model="form.timezone" placeholder="请选择时区">
          <el-option label="UTC+8 (北京时间)" value="UTC+8" />
          <el-option label="UTC+0 (格林尼治时间)" value="UTC+0" />
        </el-select>
      </el-form-item>
      <el-form-item label="启用通知">
        <el-switch v-model="form.notifications" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="saveSettings">保存设置</el-button>
        <el-button>重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import { ElMessage } from 'element-plus'

export default defineComponent({
  name: 'BasicSettings',
  setup() {
    const form = reactive({
      systemName: 'AI 会话系统',
      language: 'zh',
      timezone: 'UTC+8',
      notifications: true
    })

    const saveSettings = () => {
      ElMessage.success('设置已保存')
      // 这里可以添加保存设置的API调用
    }

    return {
      form,
      saveSettings
    }
  }
})
</script>

<style scoped>
.basic-settings {
  max-width: 800px;
}
</style>